home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form w_gauge_demo
- BorderStyle = 1 'Fixed Single
- Caption = "ctGauge and ctMeter (Gauge and Status Meter) Demo"
- ClientHeight = 5670
- ClientLeft = 1335
- ClientTop = 1815
- ClientWidth = 7140
- Height = 6075
- Icon = "ct_gauge.frx":0000
- Left = 1275
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MDIChild = -1 'True
- MinButton = 0 'False
- ScaleHeight = 5670
- ScaleWidth = 7140
- Top = 1470
- Width = 7260
- Begin VB.CheckBox ck_display
- Caption = "Display Text ( Meters Only )"
- Height = 285
- Left = 4020
- TabIndex = 12
- Top = 3780
- Value = 1 'Checked
- Width = 2835
- End
- Begin VB.Frame Frame2
- Caption = "Border Types"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 1365
- Left = 1020
- TabIndex = 11
- Top = 4050
- Width = 2655
- Begin VB.OptionButton opt_style
- Caption = "Inset"
- Height = 285
- Index = 5
- Left = 1260
- TabIndex = 18
- Top = 990
- Width = 1095
- End
- Begin VB.OptionButton opt_style
- Caption = "Drop Shadow"
- Height = 285
- Index = 4
- Left = 1260
- TabIndex = 17
- Top = 630
- Width = 1335
- End
- Begin VB.OptionButton opt_style
- Caption = "Lowered"
- Height = 285
- Index = 3
- Left = 1260
- TabIndex = 16
- Top = 270
- Width = 975
- End
- Begin VB.OptionButton opt_style
- Caption = "Raised"
- Height = 285
- Index = 2
- Left = 180
- TabIndex = 15
- Top = 990
- Value = -1 'True
- Width = 975
- End
- Begin VB.OptionButton opt_style
- Caption = "None"
- Height = 285
- Index = 1
- Left = 180
- TabIndex = 14
- Top = 630
- Width = 975
- End
- Begin VB.OptionButton opt_style
- Caption = "Regular"
- Height = 285
- Index = 0
- Left = 180
- TabIndex = 13
- Top = 270
- Width = 915
- End
- End
- Begin VB.Frame Frame1
- Caption = "Active Control"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 1365
- Left = 1020
- TabIndex = 5
- Top = 1620
- Width = 2475
- Begin VB.OptionButton opt_gauge
- Caption = "Gauge Control"
- Height = 285
- Left = 240
- TabIndex = 9
- Top = 990
- Width = 1935
- End
- Begin VB.OptionButton opt_vert
- Caption = "Vertical Meter"
- Height = 285
- Left = 240
- TabIndex = 8
- Top = 630
- Width = 1995
- End
- Begin VB.OptionButton opt_horz
- Caption = "Horizontal Meter"
- Height = 285
- Left = 240
- TabIndex = 7
- Top = 270
- Value = -1 'True
- Width = 1935
- End
- End
- Begin VB.CommandButton Command1
- Caption = "E&xit"
- Height = 375
- Left = 5640
- TabIndex = 4
- Top = 5130
- Width = 1215
- End
- Begin VB.HScrollBar HScroll1
- Height = 285
- LargeChange = 5
- Left = 1020
- Max = 100
- TabIndex = 3
- Top = 3150
- Width = 2715
- End
- Begin VB.Label Label2
- Caption = "Move scroll bar to adjust the control"
- ForeColor = &H00800000&
- Height = 285
- Left = 1020
- TabIndex = 10
- Top = 3600
- Width = 2715
- End
- Begin VB.Label Label1
- Alignment = 2 'Center
- Caption = $"ct_gauge.frx":030A
- Height = 735
- Left = 120
- TabIndex = 6
- Top = 90
- Width = 6915
- End
- Begin GaugeLibCtl.ctGauge ctGauge1
- Height = 1965
- Left = 3960
- TabIndex = 2
- Top = 1530
- Width = 2970
- _version = 65536
- _extentx = 5238
- _extenty = 3466
- _stockprops = 64
- angleend = 197
- anglestart = 343
- bordertype = 2
- needleyoffset = 14
- picture = "ct_gauge.frx":0422
- needlecolor = 255
- End
- Begin MeterLibCtl.ctMeter ctMeter2
- Height = 4455
- Left = 120
- TabIndex = 1
- Top = 990
- Width = 735
- _version = 65536
- _extentx = 1296
- _extenty = 7858
- _stockprops = 68
- BeginProperty font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 9.75
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- bordertype = 3
- meterstyle = 1
- backcolor = 14745599
- forecolor = 49344
- End
- Begin MeterLibCtl.ctMeter ctMeter1
- Height = 465
- Left = 960
- TabIndex = 0
- Top = 990
- Width = 6015
- _version = 65536
- _extentx = 10610
- _extenty = 820
- _stockprops = 68
- BeginProperty font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- name = "Times New Roman"
- charset = 0
- weight = 700
- size = 9.75
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- bordertype = 2
- End
- Attribute VB_Name = "w_gauge_demo"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Private Sub ck_display_Click()
- If opt_horz.Value = True Then
- ctMeter1.DisplayText = ck_display.Value
- Else
- ctMeter2.DisplayText = ck_display.Value
- End If
- End Sub
- Private Sub Command1_Click()
- Unload w_gauge_demo
- End Sub
- Private Sub Form_Load()
- ' Center the window on the screen
- Move (Screen.Width - Width) / 2, (Screen.Height - Height) * 0.15
- End Sub
- Private Sub HScroll1_Change()
- If opt_horz.Value = True Then
- ctMeter1.Value = HScroll1.Value
- ElseIf opt_vert.Value = True Then
- ctMeter2.Value = HScroll1.Value
- Else
- ctGauge1.Value = HScroll1.Value
- End If
- End Sub
- Private Sub HScroll1_Scroll()
- If opt_horz.Value = True Then
- ctMeter1.Value = HScroll1.Value
- ElseIf opt_vert.Value = True Then
- ctMeter2.Value = HScroll1.Value
- Else
- ctGauge1.Value = HScroll1.Value
- End If
- End Sub
- Private Sub opt_gauge_Click()
- ' Set the style buttons
- opt_style(ctGauge1.BorderType) = True
- ' Set the display text button
- ck_display.Enabled = False
- ' Set the scroll bar
- HScroll1.Value = ctGauge1.Value
- End Sub
- Private Sub opt_horz_Click()
- ' Set the style buttons
- opt_style(ctMeter1.BorderType) = True
- ' Set the Diplay text box
- ck_display.Enabled = True
- If ctMeter1.DisplayText = True Then
- ck_display.Value = 1
- Else
- ck_display.Value = 0
- End If
- ' Set the scroll bar
- HScroll1.Value = ctMeter1.Value
- End Sub
- Private Sub opt_style_Click(Index As Integer)
- If opt_horz.Value = True Then
- ctMeter1.BorderType = Index
- ElseIf opt_vert.Value = True Then
- ctMeter2.BorderType = Index
- Else
- ctGauge1.BorderType = Index
- End If
- End Sub
- Private Sub opt_vert_Click()
- ' Set the style buttons
- opt_style(ctMeter2.BorderType) = True
- ' Set the display text button
- ck_display.Enabled = True
- If ctMeter2.DisplayText = True Then
- ck_display.Value = 1
- Else
- ck_display.Value = 0
- End If
- ' Set the scroll bar
- HScroll1.Value = ctMeter2.Value
- End Sub
-